import request from '@/utils/request'

export const fetchEmpAPI = (params) => {
  return request({
    method: 'GET',
    url: '/emps',
    params
  })
}

export const deleteEmpAPI = (ids) => {
  return request({
    method: 'DELETE',
    url: `/emps/${ids}`
  })
}

export const addEmpAPI = (data) => {
  return request({
    method: 'POST',
    url: '/emps',
    data
  })
}

export const fetchEmpDetailAPI = (id) => {
  return request({
    url: `/emps/${id}`,
    method: 'GET'
  })
}

export const editEmpAPI = (data) => {
  return request({
    url: '/emps',
    method: 'PUT',
    data
  })
}
